package name.hankc.spring;

import java.util.Map;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.ApplicationContext;

import name.hankc.spring.dao.DemoDao;

public class OfTypeApplication {

  public static void main(String[] args) throws Exception {
    ApplicationContext ctx = new ClassPathXmlApplicationContext("basic_dl/quickstart-oftype.xml");
    Map<String, DemoDao> beans = ctx.getBeansOfType(DemoDao.class);
    beans.forEach((beanName, bean) -> {
      System.out.println(beanName + " : " + bean.toString());
    });
  }
}